﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
public partial class master_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void grv_Cargos_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        /*
         <asp:Button ID="updateC" runat="server" 
        * CommandName="updateCargo" 
        * CommandArgument="<%# Eval("iCargo_id") %>" Text="<%# Eval("sNombre_Cargo") %>" />
        * 
        */
    }
    [WebMethod]
    public static bool EliminarCargo(string sCargo)
    {
        int idCargo = Convert.ToInt32(sCargo);
        ModPersona modPersona = new ModPersona();
        Tbl_Cargos cargoActual = modPersona.getCargo(idCargo);
        return (cargoActual != null)? modPersona.deleteCargos(cargoActual): false;
    }

    protected void add_Click(object sender, EventArgs e)
    {
        Response.Redirect("CargosForm.aspx");
    }
}